<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs for page register_plugins.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="file-name"><img src="../media/images/Page_logo.png" alt="File" style="vertical-align: middle">/register_plugins.php</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
									<a href="#sec-includes">Includes</a>
												</div>
	<div class="info-box-body">	
		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Plugin registration script.</p>
<p class="description"><p>This script does plugin registration, it actually calls <a href="../psa/Psa_Plugin.html#methodregister">Psa_Plugin::register()</a>  and <a href="../psa/Psa_Plugin.html#methodsave">Psa_Plugin::save()</a> methods.  See their documentation for details about the plugin registration process.  When you add some new plugins (new classes that extends <em>Psa_Plugin_</em> classes,  not methods inside already registered classes) you must register plugins to save data  like path and type into the database. After that you can call plugin methods with  <a href="../psa/_scripts---functions.php.html#functionpsa_run_plugins">psa_run_plugins()</a> function.</p><p>This script should be called directly in web browser by typing url like:  <kbd>http://my_site.com/psa/register_plugins.php</kbd>. You don't have to use this  script for plugin registration. It is here for your convenience, but you can do it in some  of your model plugins if you like, by calling these two methods:  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;register&nbsp;plugins</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$plugins_data&nbsp;</span>=&nbsp;<span class="src-id"><a href="../psa/Psa_Plugin.html">Psa_Plugin</a></span><span class="src-sym">::</span><a href="../psa/Psa_Plugin.html#methodget_instance">get_instance</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">register</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;save&nbsp;registered&nbsp;data</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id"><a href="../psa/Psa_Plugin.html">Psa_Plugin</a></span><span class="src-sym">::</span><a href="../psa/Psa_Plugin.html#methodget_instance">get_instance</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">save</span><span class="src-sym">(</span><span class="src-var">$plugins_data</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div></p><p>If <a href="../psa/tutorial_psa_features.pkg.html#developmode">develop mode</a> is on, registration is done on every  request so you don't need to call this script. This script can be useful on production  site when you add some new plugin class.</p><p><strong>Note:</strong> Do not allow everyone to call this script.</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Bojan Mauser &lt;<a href="mailto:bmauser@gmail.com">bmauser@gmail.com</a>&gt;</li>
				<li><span class="field">version:</span> $Id: register_plugins.php 464 2009-03-24 00:30:12Z bmauser $</li>
				<li><span class="field">copyright:</span> Bojan Mauser 2009</li>
				<li><span class="field">see:</span> <a href="../psa/_scripts---functions.php.html#functionpsa_run_plugins">psa_run_plugins()</a></li>
				<li><span class="field">see:</span> <a href="../psa/Psa_Plugin.html#methodsave">Psa_Plugin::save()</a></li>
				<li><span class="field">see:</span> <a href="../psa/Psa_Plugin.html#methodregister">Psa_Plugin::register()</a></li>
				<li><span class="field">link:</span> <a href="http://code.google.com/p/phpstartapp/">http://code.google.com/p/phpstartapp/</a></li>
				<li><span class="field">todo:</span> Put some security into this script or remove it from psa folder.</li>
				<li><span class="field">filesource:</span> <a href="../__filesource/fsource_psa__register_plugins.php.html">Source Code for this file</a></li>
			</ul>
		
			</div>
</div>
		

	<a name="sec-includes"></a>	
	<div class="info-box">
		<div class="info-box-title">Includes</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Includes</span>
														</div>
		<div class="info-box-body">	
			<a name="_scripts/Psa_Pdo_class_php"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Page.png" alt=" " />
		<span class="include-title">
			<span class="include-type">include_once</span>
			(<span class="include-name"><a href="../psa/_scripts---Psa_Pdo.class.php.html">'scripts/Psa_Pdo.class.php'</a></span>)
			(line <span class="line-number"><a href="../__filesource/fsource_psa__register_plugins.php.html#a52">52</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
</div>
<a name="_config_php"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Page.png" alt=" " />
		<span class="include-title">
			<span class="include-type">include_once</span>
			(<span class="include-name"><a href="../psa/_config.php.html">'config.php'</a></span>)
			(line <span class="line-number"><a href="../__filesource/fsource_psa__register_plugins.php.html#a51">51</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
</div>
<a name="_scripts/Psa_Singleton_class_php"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Page.png" alt=" " />
		<span class="include-title">
			<span class="include-type">include_once</span>
			(<span class="include-name">'scripts/Psa_Singleton.class.php'</span>)
			(line <span class="line-number"><a href="../__filesource/fsource_psa__register_plugins.php.html#a53">53</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
</div>
<a name="_scripts/Psa_Logger_class_php"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Page.png" alt=" " />
		<span class="include-title">
			<span class="include-type">include_once</span>
			(<span class="include-name"><a href="../psa/_scripts---Psa_Logger.class.php.html">'scripts/Psa_Logger.class.php'</a></span>)
			(line <span class="line-number"><a href="../__filesource/fsource_psa__register_plugins.php.html#a54">54</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
</div>
<a name="_scripts/functions_php"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Page.png" alt=" " />
		<span class="include-title">
			<span class="include-type">include_once</span>
			(<span class="include-name"><a href="../psa/_scripts---functions.php.html">'scripts/functions.php'</a></span>)
			(line <span class="line-number"><a href="../__filesource/fsource_psa__register_plugins.php.html#a56">56</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
</div>
<a name="_scripts/Psa_Plugin_class_php"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Page.png" alt=" " />
		<span class="include-title">
			<span class="include-type">include_once</span>
			(<span class="include-name"><a href="../psa/_scripts---Psa_Plugin.class.php.html">'scripts/Psa_Plugin.class.php'</a></span>)
			(line <span class="line-number"><a href="../__filesource/fsource_psa__register_plugins.php.html#a55">55</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
</div>
		</div>
	</div>
	
	
	
	
	<p class="notes" id="credit">
		Documentation generated on Thu, 21 Oct 2010 01:40:58 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>